const movesNames = `axe-sword.png, bird-claw.png, bolt-spell-cast.png, crossed-sabres.png, curled-tentacle.png, diamond-hard.png, eye-of-horus.png, fairy-wand.png, falling-star.png, fangs.png, fire-spell-cast.png, gift-of-knowledge.png, gift-trap.png, high-kick.png, high-punch.png, hooded-figure.png, ice-spell-cast.png, meditation.png, revolt.png, robber-hand.png, running-ninja.png, smoking-finger.png, snatch.png, sword-brandish`.replace(/, ?/g, "").split('.png');
// 战斗时有效，大部分是加成，一部分概率生成buff，加入战斗延时队列
// 全部写成特殊效果 func 24 种
const movesData = [
    {
        name: "剑斧双击",
        desc: "临时提高0.4暴击",
        func: function (stat) {
            if (stat[1] > 2 && Math.random() < 0.5) {
                stat[7] += Math.round(0.4 * stat[1]);
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "爪击",
        desc: "临时提高0.1速度0.3攻击",
        func: function (stat) {
            if (stat[1] > 2 && Math.random() < 0.5) {
                stat[6] += Math.round(0.1 * stat[1]);
                stat[2] += Math.round(0.3 * stat[1]);
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "掌心雷",
        desc: "临时提高0.1暴击0.3命中",
        func: function (stat) {
            if (stat[1] > 2 && Math.random() < 0.5) {
                stat[7] += Math.round(0.1 * stat[1]);
                stat[4] += Math.round(0.3 * stat[1]);
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "双刃招架",
        desc: "临时提高0.4幸运",
        func: function (stat) {
            if (stat[1] > 2 && Math.random() < 0.5) {
                stat[5] += Math.round(0.4 * stat[1]);
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "触手拍打",
        desc: "缠绕眩晕",
        func: function (stat, tag, target) {
            let _rate = Math.random();
            if (_rate > 0.7) {
                battleQueue.push({ tag, target, id: 4, type: 1, turn: 1 });
                console.log(`成功发动${this.name}`);
                console.log(`缠绕`);
            } else if (_rate < 0.2) {
                battleQueue.push({ tag, target, id: 10, type: 1, turn: 1 });
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "采掘",
        desc: "碎裂",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 17, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "荷鲁斯之眼",
        desc: "致死",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 22, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "魔法仙女棒",
        desc: "闪亮之星",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, tag, id: 13, type: 0, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "星落",
        desc: "惊惧",
        func: function (stat, tag, target) {
            if (Math.random() < 0.2) {
                battleQueue.push({ tag, target, id: 13, type: 1, turn: 1 });
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "齿咬",
        desc: "受伤",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 3, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "火焰掌",
        desc: "愤怒",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 6, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "天赐智慧",
        desc: "咒术之剑",
        func: function (stat, tag, target) {
            if (Math.random() < 0.2) {
                battleQueue.push({ tag, tag, id: 12, type: 0, turn: 1 });
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "天赐生命",
        desc: "生命祝福",
        func: function (stat, tag, target) {
            if (Math.random() < 0.2) {
                battleQueue.push({ tag, tag, id: 17, type: 0, turn: 1 });
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "踢击",
        desc: "致残",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 0, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "直拳",
        desc: "破碎武器",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 20, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "闪身",
        desc: "速度幸运",
        func: function (stat) {
            stat[5] += 5;
            stat[6] += 4;
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "寒冰掌",
        desc: "脆骨",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 2, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "冥想",
        desc: "超级狙击",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, tag, id: 15, type: 0, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "重拳",
        desc: "晕眩",
        func: function (stat, tag, target) {
            if (Math.random() < 0.2) {
                battleQueue.push({ tag, target, id: 10, type: 1, turn: 1 });
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "窃取财物",
        desc: "立即获得物品",
        func: function (stat) {
            console.log("战后获得窃取的物品");
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "疾行",
        desc: "速度暴涨",
        func: function (stat) {
            stat[6] += 20;
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "火光一闪",
        desc: "低落",
        func: function (stat, tag, target) {
            battleQueue.push({ tag, target, id: 5, type: 1, turn: 1 });
            console.log(`成功发动${this.name}`);
        }
    },
    {
        name: "收买",
        desc: "混乱",
        func: function (stat, tag, target) {
            if (Math.random() < 0.2) {
                battleQueue.push({ tag, target, id: 8, type: 1, turn: 1 });
                console.log(`成功发动${this.name}`);
            }
        }
    },
    {
        name: "挥砍",
        desc: "攻防",
        func: function (stat) {
            stat[2] += 5;
            stat[3] += 4;
            console.log(`成功发动${this.name}`);
        }
    },
]